package com.dlyk.mapper;

import com.dlyk.bean.TClue;
import com.dlyk.query.BaseQuery;
import com.dlyk.result.NameValue;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TClueMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(TClue record);

    int insertSelective(TClue record);

    TClue selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TClue record);

    int updateByPrimaryKey(TClue record);

    /**
     * 线索管理分页查询
     * @param build
     * @return
     */
    List<TClue> selectByCluePage(BaseQuery build);

    /**
     * 保存Excel文件
     * @param tClueList
     */
    void saveClue(List<TClue> tClueList);

    /**
     * 验证手机号是否录入
     * @param phone
     * @return
     */
    int getPhone(String phone);

    /**
     * 根据id查询线索详情
     * @param id
     * @return
     */
    TClue selectDetailById(Integer id);

    Integer selectClueCount();

    /**
     * 查询线索来源
     * @return
     */
    List<NameValue> selectByResource();
}